<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        let now = new Date();
        now.getFullYear();
        now.getMonth();     // 0~11月
        now.getDate();      // 日
        now.getDay();
        now.getHours();
        now.getMinutes();
        now.getSeconds();

        now.getTime();      // 获取时间戳

        now.toLocaleString()

        now.toUTCString()
    </script>
</head>
<body>

</body>
</html>